package com.seawaterbt.ssm.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seawaterbt.ssm.config.DataSource;
import com.seawaterbt.ssm.config.DataSourceEnum;
import com.seawaterbt.ssm.entity.CzBasHeatsourceExit;
import com.seawaterbt.ssm.entity.CzDatHeatSourceOutletData;
import com.seawaterbt.ssm.entity.ShengDatHeatSourceOutletData;
import com.seawaterbt.ssm.mapper.ShengDatHeatSourceOutletDataMapper;
import com.seawaterbt.ssm.service.CzBasHeatsourceExitService;
import com.seawaterbt.ssm.service.CzDatHeatSourceOutletDataService;
import com.seawaterbt.ssm.service.ShengDatHeatSourceOutletDataService;
import com.seawaterbt.ssm.service.ZDatHeatSourceOutletDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zhf
 * @since 2019-10-31
 */
@Service
public class ZDatHeatSourceOutletDataServiceImpl extends ServiceImpl<ShengDatHeatSourceOutletDataMapper, ShengDatHeatSourceOutletData> implements ZDatHeatSourceOutletDataService {
    DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Autowired
    CzDatHeatSourceOutletDataService datHeatSourceOutletDataService;
    @Autowired
    CzBasHeatsourceExitService basHeatsourceExitService;

    @DataSource(DataSourceEnum.DB3)
    @Override
    public boolean saveOrUpdate(ShengDatHeatSourceOutletData entity) {
        return super.saveOrUpdate(entity);
    }

    @DataSource(DataSourceEnum.DB3)
    @Override
    public ShengDatHeatSourceOutletData getByCodeTime(QueryWrapper wrapper) {
        return this.getOne(wrapper);
    }

    @DataSource(DataSourceEnum.DB3)
    @Override
    public boolean save(ShengDatHeatSourceOutletData entity) {
        return super.save(entity);
    }
    @DataSource(DataSourceEnum.DB3)
    @Override
    public List<ShengDatHeatSourceOutletData> list(Wrapper<ShengDatHeatSourceOutletData> queryWrapper) {
        return super.list(queryWrapper);
    }
}
